﻿using mozhi.smarterp.BasicData.Enums;
using System;
using System.Collections.Generic;
using System.Text;

namespace mozhi.smarterp.BasicData.BusinessGroups
{
    /// <summary>
    /// 业务员
    /// </summary>
    public class BusinessPersonnel : AggregateRootBase
    {
        public BusinessPersonnelType Type { get; private set; }

        public List<BusinessPersonnelEmployeeItem> EmployeeItems { get; private set; }

        public List<BusinessPersonnelGroupItem> GroupItems { get; private set; }

        public BusinessPersonnel(Guid id, string code, string name, bool activate, BusinessPersonnelType type) : base(id, code, name, activate)
        {
            Type = type;

            if (Type == default)
                throw new ArgumentNullException(nameof(type));

            EmployeeItems = new List<BusinessPersonnelEmployeeItem>();

            GroupItems = new List<BusinessPersonnelGroupItem>();
        }
    }


    public class BusinessPersonnelGroupItem : EntityBase
    {
        public Guid BusinessGroupId { get; private set; }

        public Guid BusinessPersonnelId { get; private set; }

        private BusinessPersonnelGroupItem() { }
    }

    public class BusinessPersonnelEmployeeItem : EntityBase
    {
        public Guid EmployeeId { get; private set; }

        public Guid BusinessPersonnelId { get; private set; }

        private BusinessPersonnelEmployeeItem() { }
    }
}
